#coding:utf-8
import os
import sys,cgi
from com.ghf import model 

class G_Page():
    #运行页面的程序
    def pageRun(self,pagename):        
        page = model.getPage(self, pagename)
        if page is None:
            pass
        elif page.Fopen is True:
            pass#@todo: 要去做圣贤的工作啊
        #页面不存在
    def run(self):
        pass
    def widget(self,widgetname):
        widgetnode = "com.ghf.widgets.widget_" + widgetname        
        #print widgetnode + "\n"
        try:
            mid = __import__(widgetnode,globals(),locals(),['*'],-1)
            rs = mid.run()
            del mid
            return rs
        except ImportError:
            return "error"
        
        

    
    
    

    